package sy.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import sy.dao.AppEquipmentDaoI;
import sy.model.AppEquipment;
import sy.service.AppEquipmentServiceI;
@Service("appEquipmentService")
public class AppEquipmentServiceImpl implements AppEquipmentServiceI{
	
	@Autowired
	AppEquipmentDaoI appEquipmentDao;

	@Override
	public Serializable save(AppEquipment  appEquipment) {
		
		return appEquipmentDao.save(appEquipment);
	}
	
	@Override
	public void remove(String[] ids) {
		for (int i = 0; i < ids.length; i++) {
			AppEquipment  appEquipment =	appEquipmentDao.getAppEquipmentById(ids[i]);
			appEquipmentDao.remove(appEquipment);
		}
	}
	
	@Override
	public void update(AppEquipment appEquipment) {
		// TODO Auto-generated method stub
		appEquipmentDao.update(appEquipment);
	}
	
	@Override
	public List<AppEquipment> getList() {
		// TODO Auto-generated method stub
		return appEquipmentDao.getList();
	}
	
	@Override
	public AppEquipment getAppEquipmentById(String id) {
		// TODO Auto-generated method stub
		return appEquipmentDao.getAppEquipmentById(id);
	}
	
//	@Override
//	public List<AppEquipment> listAppEquipmentByOwnerId(String ownerId) {
//		// TODO Auto-generated method stub
//		return appEquipmentDao.listAppEquipmentByOwnerId(ownerId);
//	}

	@Override
	public AppEquipment getAppEquipmentByCode(String code) {
		// TODO Auto-generated method stub
		return appEquipmentDao.getAppEquipmentByCode(code);
	}
}
